#ifndef _INTERPOLATE_SHADER_H_
#define _INTERPOLATE_SHADER_H_

#include "shader.h"

class InterpolateShader : public Shader {
public:
	InterpolateShader(const glm::vec3& startCol, const glm::vec3& stopCol)
	: _startCol(startCol), _stopCol(stopCol)
	{ }

	void transform(const glm::vec3& in, glm::vec3* out) const {
		*out = glm::mix(_startCol, _stopCol, (in.z + 1.f) / 2.f);
	}

private:
	glm::vec3 _startCol;
	glm::vec3 _stopCol;
};

#endif // _INTERPOLATE_SHADER_H_

